<template>
  <aside class="ConBox">
    <div class="top-header border-bottom">
      <div class="top-back"><a class="return conBack" @click="returnDl">返回</a></div>
      <div class="top-bt">选择游戏 </div>
    </div>
    <div class="BoxLink Jbox f30" id="gameList">
      <a @click="gameChoice(list.gameName,list.gameId)" v-for="list in listPublish">{{list.gameName}}</a>
    </div>
  </aside>
</template>
<script>
  export default {
    name:"DlPublishChoice",
    data(){
      return{
        listPublish:[]
      }
    },
    created(){
      this.$http.post(this.$CONSTANTS.APIStore + "storeGame/getList",{}).then((res)=>{
        if (res.body.responseStatus.code == "00" && res.body.data.length > 0) {
          console.log(res.body.data)
          this.listPublish = res.body.data

        }
      })
    },
    methods:{
      gameChoice(gameName,gameId){
        this.$emit('nameChoice',
          {
            gameName:gameName,
            gameId:gameId,
          })
        this.$parent.hide = false
      },
      returnDl(){
        this.$parent.hide = false
      }

    }
  }

</script>
<style scoped>
  .ConBox {
    width: 100%;
    height: 100%;
    max-width: 768px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    z-index: 2001;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 1;
    background: #fff;
  }
</style>